package com.rainman.simpleredis.core.process_flow;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ProcessFlowMsgBean {

    /**
     * key
     */
    private String key;


    /**
     * 过期时间
     */
    private Long outTime;

    /**
     * 当前下标
     */
    private Integer curIndex;

    /**
     * 状态
     */
    private Integer state;

    /**
     * 工作流类型名称
     */
    private List<String> types=new ArrayList<>();

    /**
     * 返回值
     */
    private List<String> returnInfo=new ArrayList<>();//["",""]

    /**
     * 参数
     */
    private List<String> paramInfo=new ArrayList<>();//["["#{0}","#{0.id}"]","[#{1.id}]","[sss]"]

    public static final  Integer StateDoIng=210;//处理中
    public static final  Integer StateSucc=200;//处理完成，成功
    public static final  Integer StateUnDoIng=510;//回滚中
    public static final  Integer StateUnDoed=500;//回滚完成
    public static final  Integer StateDead=511;//回滚失败

    public void add(String type){
        types.add(type);

    }

}
